package com.wbt.event;

import lombok.Data;

/**
 * @author daojin
 * @date 2022/3/31 7:20 下午
 * 邮件服务监听器
 * 该邮件服务监听器将在监听到任务结束事件时将任务的执行结果发送给用户。
 */
@Data
public class MailTaskFinishListener implements TaskFinishEventListner{

    private String emial;

    public MailTaskFinishListener(String emial) {
        this.emial = emial;
    }

    @Override
    public void onTaskFinish(TaskFinishEvent event) {
        System.out.println("Send Emial to "+emial+" Task:"+event.getSource());
    }
}
